feat: add manipulation planning groups#2489
Conversation
f157926 to
31731b1
Compare
Co-authored-by: cc <55869557+TomCC7@users.noreply.github.com>
Greptile SummaryThis PR introduces first-class manipulation planning groups: public
Confidence Score: 3/5Planning for a single robot in a multi-robot setup will fault the module whenever any other robot has a stale state monitor, because _selected_joint_state now always queries the whole-world joint state instead of only the robots involved in the plan. The key regression is in _selected_joint_state: it calls current_global_joint_state() which checks staleness for every registered robot before returning any start configuration. In a dual-arm setup this means a temporary connectivity blip on one arm blocks all planning on the other arm and sends the module into FAULT, requiring an explicit reset. dimos/manipulation/manipulation_module.py (_selected_joint_state / current_global_joint_state interaction) and dimos/manipulation/planning/monitor/world_monitor.py (current_global_joint_state staleness check scope). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[plan_to_pose_targets / plan_to_joint_targets] --> B{pre-flight checks}
B -->|fail| Z[return False]
B -->|pass| C[_begin_planning state PLANNING]
C --> D[_selected_joint_state current_global_joint_state ALL robots]
D -->|any robot stale| E[_fail FAULT]
D -->|fresh| F{pose or joint?}
F -->|pose| G[inverse_kinematics PinkIK.solve_pose_targets]
F -->|joint| H[joint_target_to_global_names]
G --> I[_plan_selected_path planner.plan_selected_joint_path]
H --> I
I -->|fail| E
I -->|success| J[store GeneratedPlan state COMPLETED]
J --> K[preview_plan animate_plan]
J --> L[execute_plan project local trajectories sequential coordinator dispatch]
L --> M[_invoke_coordinator_task per affected robot]
M -->|all ok| N[state COMPLETED]
M -->|first fail| E
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[plan_to_pose_targets / plan_to_joint_targets] --> B{pre-flight checks}
B -->|fail| Z[return False]
B -->|pass| C[_begin_planning state PLANNING]
C --> D[_selected_joint_state current_global_joint_state ALL robots]
D -->|any robot stale| E[_fail FAULT]
D -->|fresh| F{pose or joint?}
F -->|pose| G[inverse_kinematics PinkIK.solve_pose_targets]
F -->|joint| H[joint_target_to_global_names]
G --> I[_plan_selected_path planner.plan_selected_joint_path]
H --> I
I -->|fail| E
I -->|success| J[store GeneratedPlan state COMPLETED]
J --> K[preview_plan animate_plan]
J --> L[execute_plan project local trajectories sequential coordinator dispatch]
L --> M[_invoke_coordinator_task per affected robot]
M -->|all ok| N[state COMPLETED]
M -->|first fail| E
Reviews (9): Last reviewed commit: "fix: restore dual xarm planner coordinat..." | Re-trigger Greptile |
Summary
robot/groupIDs, global joint names, SRDF/fallback discovery, registry construction, and selector-aware world resolution.ManipulationModulecan plan to group-scoped pose and joint targets while preserving local model joint names internally.groups/identifiers.py; joint target/state helpers live ingroups/joints.py.Stack
Verification
uv run pytest dimos/manipulation/planning/test_planning_group_identifiers.py dimos/manipulation/planning/test_planning_group_joints.py dimos/manipulation/planning/kinematics/test_pink_ik.py dimos/manipulation/test_manipulation_unit.py -quv run pytest dimos/manipulation/planning/kinematics -quv run pytest dimos/e2e_tests/test_manipulation_planning_groups.py -m self_hosted_large -quv run pytest dimos/e2e_tests/test_control_coordinator.py -quv run pytest dimos/robot/test_all_blueprints.py dimos/robot/test_all_blueprints_generation.py dimos/control/blueprints/test_dual.py -quv run pytest dimos/manipulation/visualization/test_factory.py dimos/manipulation/visualization/viser/test_viser_visualization.py dimos/manipulation/visualization/viser/test_visualizer_lifecycle.py dimos/manipulation/test_manipulation_unit.py -quv run --group lint mypyuv run ruff check .../uv run ruff format --check ...rtk git diff --checkNotes